import { Slider } from 'antd-mobile'
import React from 'react'
import styles from './index.module.less'
import type { SliderProps } from 'antd-mobile/es/components/slider'

interface CustomSlideProps extends SliderProps {
    unit?: string
}
export default function CustomSlider(props: CustomSlideProps) {
    const { value, unit = '分' } = props
    return (
        <div className={styles.custom_slider_wrapper}>
            <Slider {...props} value={Number(value) || 0} className={styles.my_slider} />
            <div className="max_score">
                {value || 0}
                {unit}
            </div>
        </div>
    )
}
